Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uniformize kwargs for Paligemma processor and update docs #33571

Merged

Conversation

yonigozlan
Copy link
Member

@yonigozlan yonigozlan commented Sep 18, 2024

What does this PR do?

Adds uniformized processors kwargs following #31911 for Paligemma.
Continuation of #32377 .

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@molbap @amyeroberts

@yonigozlan yonigozlan mentioned this pull request Sep 18, 2024
40 tasks
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@molbap molbap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! Thanks a lot :)

tests/models/paligemma/test_processor_paligemma.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding!

Main comment is just about the default for tokenize_newline_separately

tests/models/paligemma/test_processor_paligemma.py Outdated Show resolved Hide resolved
Comment on lines 39 to 42
if sys.version_info >= (3, 11):
from typing import Unpack
else:
from typing_extensions import Unpack
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If #31198 is merged in first - then this should be imported from processing_utils cc @molbap as we might need a PR to clean this up for other processors after 31198 merge

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! I'll open a PR to do a batch replace towards

from processing_utils import Unpack

@yonigozlan yonigozlan merged commit f111d5b into huggingface:main Sep 19, 2024
17 checks passed
itazap pushed a commit to NielsRogge/transformers that referenced this pull request Sep 20, 2024
amyeroberts pushed a commit to amyeroberts/transformers that referenced this pull request Oct 2, 2024
@MnCSSJ4x
Copy link

Hey. Thanks for taking this up and continuing on my PR and completing it. I was caught up with a lot of work and wasn't able to fix issues after the last iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants